//
//  HeadViewButton.m
//  沙哈拉FM
//
//  Created by dllo on 15/11/8.
//  Copyright © 2015年 S1mpl3. All rights reserved.
//

#import "HeadViewButton.h"
#import "FitHeader.h"
@implementation HeadViewButton

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        _leftButton = [[BaseButton alloc]initWithFrame:CGRectMake(16 * FITWidth, 0, 375 * FITWidth / 2 , self.frame.size.height)];
        [_leftButton setFontSize:14];
        [_leftButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        _leftButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
        
        _moreButton = [[BaseButton alloc]initWithFrame:CGRectMake(_leftButton.frame.origin.x + _leftButton.frame.size.width, 0, 159 * FITHeight, self.frame.size.height)];
        [_moreButton setFontSize:14];
        [_moreButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        _moreButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
        
        _moreImageView = [[UIImageView alloc] initWithFrame:CGRectMake(_moreButton.frame.origin.x + _moreButton.frame.size.width, 10 * FITHeight, 16 * FITHeight, 16 * FITHeight)];
        _moreImageView.image = [UIImage imageNamed:@"更多"];
        
        _leftImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 10 * FITHeight, 16 * FITHeight, 16 * FITHeight)];
        _leftImageView.image = [UIImage imageNamed:@"三角"];
        
        [self addSubview:_leftButton];
        [self addSubview:_moreButton];
        [self addSubview:_moreImageView];
        [self addSubview:_leftImageView];
        self.backgroundColor = [UIColor whiteColor];
        
    }
    return self;
}

@end
